﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Classes
{

    public class ListOfConnections
    {
        


        


        String infoAboutConnections { get; set; }
        IList<Connection> connectionList;
        int noOfseatsLeft { get; set; }
        public ListOfConnections()
        {
            connectionList = new List<Connection>();
        }
        public IList<Connection> GetConnectionList()
        {
            return connectionList;
        }
        public void AddConnection(Connection connection)
        {
            connectionList.Add(connection);
        }
        
        public void InpopulateConnections(City dc, City ac)
        {
            foreach (Connection c in connectionList)
            {
                c.DepartureCity = dc;
                c.DestinationCity = ac;
            }

        }
    }
}
